package com.sservice.model.dao;

import com.sservice.model.entity.OrderAdvanceReceipt;
import com.sservice.model.vo.OrderAdvanceReceiptVo;

import java.util.List;

public interface OrderAdvanceReceiptMapper {
    int insert(OrderAdvanceReceipt record);

    int insertSelective(OrderAdvanceReceipt record);

    /**
     * 查看付款单使用情况
     *
     * @param record
     * @return
     */
    List<OrderAdvanceReceiptVo> selectByAdvanceId1(OrderAdvanceReceipt record);

    List<OrderAdvanceReceiptVo> selectByAdvanceId0(OrderAdvanceReceipt record);

    /**
     * 查看某一个销售订单的通过预付款付款情况
     * @param record
     * @return
     */
    List<OrderAdvanceReceiptVo> selectPayToOrderByOrderId(OrderAdvanceReceipt record);

    /**
     * 批量付款
     *
     * @param record
     * @return
     */
    int payInBatch(List<OrderAdvanceReceipt> record);

    /**
     * 其他应收款批量付款
     *
     * @param record
     * @return
     */
    int payInBatchOtherOrder(List<OrderAdvanceReceipt> record);

    /**
     * 根据订单ID和类型查找付款单
     *
     * @param record
     * @return
     */
    List<OrderAdvanceReceipt> selectByOrderId(OrderAdvanceReceipt record);

    /***
     * 选择更新
     * @param record
     * @return
     */
    int updateByPrimaryKeySelective(OrderAdvanceReceipt record);
    int deleteByPrimaryKey(Integer id);
}